home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 21 / Cream of the Crop 21 (Terry Blount) (October 1996).iso / os2 / vsoup11.zip / global.hh < prev    next >
Text File  |  1996-09-02  |  3KB  |  117 lines

  1. //  $Id: global.hh 1.10 1996/09/02 13:22:12 hardy Exp $
  2. //
  3. //  This progam/module was written by Hardy Griech based on ideas and
  4. //  pieces of code from Chin Huang (cthuang@io.org).  Bug reports should
  5. //  be submitted to rgriech@ibm.net.
  6. //
  7. //  This file is part of soup++ for OS/2.  Soup++ including this file
  8. //  is freeware.  There is no warranty of any kind implied.  The terms
  9. //  of the GNU Gernal Public Licence are valid for this piece of software.
  10. //
  11.  
  12.  
  13. #ifndef __GLOBAL_HH__
  14. #define __GLOBAL_HH__
  15.  
  16.  
  17. #ifdef DEFGLOBALS
  18. #define EXTERN
  19. #define INIT(i) = i
  20. #else
  21. #define EXTERN extern
  22. #define INIT(i)
  23. #endif
  24.  
  25.  
  26. #include "areas.hh"
  27. #include "newsrc.hh"
  28.  
  29.  
  30. //
  31. //  defines for threads
  32. //
  33. #if defined(OS2)  &&  defined(__MT__)
  34. #define MAXNNTPTHREADS 10                // bei mehr als 15 hat es zu wenig Files !?
  35. #else
  36. #define MAXNNTPTHREADS 1
  37. #endif
  38.  
  39.  
  40. #define TIMEOUT        (100L)            // timeout value for connecting, aborting etc.
  41.  
  42.  
  43. //
  44. //  global variables
  45. //
  46. #if MAXNNTPTHREADS < 4
  47. #define DEFNNTPTHREADS MAXNNTPTHREADS
  48. #else
  49. #define DEFNNTPTHREADS 4
  50. #endif
  51.  
  52. EXTERN int maxNntpThreads INIT(DEFNNTPTHREADS);
  53.  
  54. #ifdef DEFGLOBALS
  55.    TAreasMail areas("areas","%07d");
  56.    TNewsrc newsrc;
  57. #else
  58.    extern TAreasMail areas;
  59.    extern TNewsrc newsrc;
  60. #endif
  61.  
  62.  
  63. //
  64. //  program options
  65. //
  66. EXTERN char doNewGroups               INIT(0);
  67. EXTERN char doNews                    INIT(1);
  68. EXTERN char doXref                    INIT(1);
  69. EXTERN char *homeDir                  INIT( NULL );
  70. EXTERN char killFile[FILENAME_MAX]    INIT("");
  71. EXTERN char killFileOption            INIT(0);
  72. EXTERN long maxBytes                  INIT(0);
  73. EXTERN int  maxLines                  INIT(0);
  74. EXTERN char newsrcFile[FILENAME_MAX]  INIT("");
  75. EXTERN char *progname                 INIT(NULL);
  76. EXTERN char readOnly                  INIT(0);
  77. EXTERN int  genStsMail                INIT(0);
  78.  
  79.  
  80. #ifdef OS2
  81. EXTERN const char *hostName     INIT(NULL);         // IBM Internet Connection for OS/2 PPP/SLIP settings
  82. #endif
  83.  
  84.  
  85. //
  86. //  host/user/passwd storage for the different protocols
  87. //
  88. struct serverInfo {
  89.     const char *host;
  90.     const char *user;
  91.     const char *passwd;
  92. };
  93.  
  94. #ifdef DEFGLOBALS
  95. serverInfo smtpInfo = {NULL,NULL,NULL};
  96. serverInfo pop3Info = {NULL,NULL,NULL};
  97. serverInfo nntpInfo = {NULL,NULL,NULL};
  98. #else
  99. extern serverInfo smtpInfo;
  100. extern serverInfo pop3Info;
  101. extern serverInfo nntpInfo;
  102. #endif
  103.  
  104.  
  105. //
  106. //  filenames
  107. //
  108. #ifdef OS2
  109. #define FN_NEWSTIME "newstime"
  110. #else
  111. #define FN_NEWSTIME ".newstime"
  112. #endif
  113. #define FN_REPLIES  "replies"
  114.  
  115.  
  116. #endif   // __GLOBAL_HH__
  117.